<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>汇智首页</title>
    <link rel="stylesheet" href="./css/style.css">
    <!-- 第一步 引入swiper插件 css和js -->
    <link rel="stylesheet" href="https://unpkg.com/swiper@8/swiper-bundle.css">
    <link rel="stylesheet" href="./css/category.css">
    <link rel="stylesheet" href="./css/goods.css">
    <link rel="stylesheet" href="./css/tabbar.css">
    <style>
        .swiper {
            width: 100%;
            height: 200px;
        }

        .swiper img {
            width: 100%;
            height: 200px;
        }

        /* 实现滚动效果，搜索和Tabbar固定 */

        body {
            /*1. 设置屏蔽宽高为视窗宽高 */
            width: 100%;
            height: 100vh;

            /*2. 设置为flex布局 */
            display: flex;
            flex-direction: column;
        }
        body .g-wrapper{
            /* calc css中一个数学函数，可以进行算术运算 */
            height: calc(100vh-50-70);
            overflow: scroll;
        }

    </style>
</head>

<body>
    <!-- 搜索区域 -->
    <div class="g-search">
        <h2>城市</h2>
        <input type="text" placeholder="请输入搜索内容" />
        <h2>登录</h2>
    </div>

    <div class="g-wrapper">
        <!-- 轮播区域 -->
        <div class="swiper">
            <div class="swiper-wrapper">
                <div class="swiper-slide">
                    <img src="../img/banner1.png" alt="banner1">
                </div>
                <div class="swiper-slide">
                    <img src="../img/banner2.png" alt="banner2">
                </div>
                <div class="swiper-slide">
                    <img src="../img/banner3.png" alt="banner3">
                </div>
            </div>
            <div class="swiper-pagination"></div>
        </div>

        <!-- 分类 -->
        <div class="a">
            <div class="box">
                <img src="../img/11.jpg" alt="11">
                <p>熊猫</p>
            </div>
            <div class="box">
                <img src="../img/22.jpg" alt="11">
                <p>美食</p>
            </div>
            <div class="box">
                <img src="../img/33.jpg" alt="11">
                <p>食物</p>
            </div>
            <div class="box">
                <img src="../img/44.jpg" alt="11">
                <p>数码</p>
            </div>
            <div class="box">
                <img src="../img/11.jpg" alt="11">
                <p>熊猫</p>
            </div>
            <div class="box">
                <img src="../img/22.jpg" alt="11">
                <p>美食</p>
            </div>
            <div class="box">
                <img src="../img/33.jpg" alt="11">
                <p>食物</p>
            </div>
            <div class="box">
                <img src="../img/44.jpg" alt="11">
                <p>数码</p>
            </div>

            <div class="box">
                <img src="../img/33.jpg" alt="11">
                <p>食物</p>
            </div>
            <div class="box">
                <img src="../img/44.jpg" alt="11">
                <p>数码</p>
            </div>
        </div>

        <!-- 商品列表区域 -->
        <div class="p">
            <!-- 商品项 -->
            <div class="g">
                <img src="../img/11.jpg" alt="11">
                <div class="r">
                    <h2>科(Kelon)正1.5匹</h2>
                    <p>科(Kelon)正1.5匹 定速</p>
                    <p>价格:90</p>
                </div>
            </div>

            <div class="g">
                <img src="../img/22.jpg" alt="11">
                <div class="r">
                    <h2>科(Kelon)正1.5匹</h2>
                    <p>科(Kelon)正1.5匹 定速</p>
                    <p>价格:90</p>
                </div>
            </div>


            <div class="g">
                <img src="../img/33.jpg" alt="11">
                <div class="r">
                    <h2>科(Kelon)正1.5匹</h2>
                    <p>科(Kelon)正1.5匹 定速</p>
                    <p>价格:90</p>
                </div>
            </div>
        </div>

    </div>

     <!-- 底部区域 -->
     <div class="g-footer">
        <div class="active">首页</div>
        <div>分类</div>
        <div>购物车</div>
        <div>我的</div>
    </div>
    <script src="https://unpkg.com/swiper@8/swiper-bundle.js"> </script>

    <script>
        new Swiper('.swiper', {
            loop: true, // 循环模式选项
            autoplay: { delay: 1000, }, //自动轮播
            effect: 'fade',
            slidesPerView: 3,
            centeredSlides: true,
            // 如果需要分页器
            pagination: {
                el: '.swiper-pagination',
            },
        })

    </script>
</body>

</html>